package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IJoinActionActivityModel;
import com.wgts.wgts.mvp.model.imp.JoinActionActivityModel;
import com.wgts.wgts.mvp.presenter.IJoinActionActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.JoinActionActivityPresenter;
import com.wgts.wgts.mvp.view.IJoinActionActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

@Module
public class JoinActionActivityModule {

    private IJoinActionActivityView view;

    public JoinActionActivityModule(IJoinActionActivityView view) {
        this.view = view;
    }

    @Provides
    @ActivityScope

    public IJoinActionActivityView provideView(){
        return view;
    }

    @Provides
    @ActivityScope
    public IJoinActionActivityModel provideModel(NetService netService){
        return new JoinActionActivityModel(netService);
    }

    @Provides
    @ActivityScope
    public IJoinActionActivityPresenter providePresenter(IJoinActionActivityView view, IJoinActionActivityModel model){
        return new JoinActionActivityPresenter(model, view);
    }

}
